

using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
using CoreCms.Net.Configuration;
using CoreCms.Net.IRepository;
using CoreCms.Net.IRepository.UnitOfWork;
using CoreCms.Net.IServices;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.ViewModels.Basics;
using CoreCms.Net.Model.ViewModels.UI;
using SqlSugar;


namespace CoreCms.Net.Services
{
    /// <summary>
    /// 连续签到规则 接口实现
    /// </summary>
    public class CoreCmsContinuousCheckInRulesServices : BaseServices<CoreCmsContinuousCheckInRules>, ICoreCmsContinuousCheckInRulesServices
    {
        private readonly ICoreCmsContinuousCheckInRulesRepository _dal;
        private readonly IUnitOfWork _unitOfWork;

        public CoreCmsContinuousCheckInRulesServices(IUnitOfWork unitOfWork, ICoreCmsContinuousCheckInRulesRepository dal)
        {
            this._dal = dal;
            base.BaseDal = dal;
            _unitOfWork = unitOfWork;
        }


        /// <summary>
        /// 重写异步插入方法
        /// </summary>
        /// <param name="entity">实体数据</param>
        /// <returns></returns>
        public async Task<AdminUiCallBack> InsertAsync(List<CoreCmsContinuousCheckInRules> entity)
        {
            return await _dal.InsertAsync(entity);
        }



        /// <summary>
        /// 获取的所有数据及子集
        /// </summary>
        /// <returns></returns>
        public async Task<List<CoreCmsContinuousCheckInRules>> GetDataWidthChild()
        {
            return await _dal.GetDataWidthChild();
        }


    }
}
